﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Xml;

namespace SDB2DM
{
    class JPGISXML : IJPGISXML
    {
        private XmlDocument doc = null;

        public JPGISXML()
        {
            XMLDoc = new XmlDocument();
        }

        #region 共通操作

        protected void BuildDocDeclaration()
        {
            XmlNode docNode = null;

            docNode = doc.CreateXmlDeclaration(Utility.HEADER_VERSION_VALUE, Utility.HEADER_ENCODING_TYPE, null);
            doc.AppendChild(docNode);
        }

        protected void BuildComment(XmlNode parentNode, XmlComment xmlCmt, string comment)
        {
            xmlCmt = doc.CreateComment(comment);
            parentNode.AppendChild(xmlCmt);
        }

        #endregion

        #region IJPGISXML メンバ

        public XmlDocument XMLDoc
        {
            get
            {
                return doc;
            }
            set
            {
                doc = value;
            }
        }

        public virtual void BuildXML()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion
    }
}
